//
//  ZBMoBanEightCollectionViewCell.m
//  MoBan
//
//  Created by apple on 16/7/14.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "ZBMoBanEightCollectionViewCell.h"
@interface ZBMoBanEightCollectionViewCell()
@property(nonatomic,strong)UIImageView *imageview;
@property(nonatomic,strong)UILabel *lable;
@property(nonatomic,strong)UILabel *detaillable;
@end
@implementation ZBMoBanEightCollectionViewCell
-(instancetype)initWithFrame:(CGRect)frame
{
    if (self= [super initWithFrame:frame]) {
//        NSLog(@"啦啦啦啦啦啦");
        [self addUI];
    }
    return self;
}
-(void)addUI
{
    self.imageview = [[UIImageView alloc]init];
    self.imageview.image = [UIImage imageNamed:@"text.png"];
    [self.contentView addSubview:self.imageview];
    
    self.lable = [[UILabel alloc]init];
    self.lable.textAlignment = NSTextAlignmentCenter;
    self.lable.text = @"测试1";
    [self.contentView addSubview:self.lable];
    
    self.detaillable = [[UILabel alloc]init];
    self.detaillable.textAlignment = NSTextAlignmentCenter;
    self.detaillable.text = @"测试2";
    [self.contentView addSubview:self.detaillable];
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    self.imageview.frame = CGRectMake(self.width/2-15*Kscr, 10*Kscr, 30*Kscr, 30*Kscr);
    
    self.lable.frame =CGRectMake(0, self.imageview.bottom+5*Kscr, self.width, 20*Kscr);
    
    self.detaillable.frame = CGRectMake(0, self.lable.bottom+5*Kscr, self.width, 20*Kscr);

}
@end
